import http from './index';

/**
 * 获取验证码
 * @param {Object} params
 */
export const getCode = (params) => {
    return http.post('/xiaofeng/send_code', params);
};

/**
 * 手机号登录
 * @param {Object} params
 */
export const userPhoneLogin = (params) => {
    return http.post('/xiaofeng/phone_login', params);
};

/**
 * 账号密码登录
 * @param {Object} params
 */
export const userLogin = (params) => {
    return http.post('/xiaofeng/select_user', params);
};

/**
 * 注册
 * @param {Object} params
 */
export const userRegister = (params) => {
    return http.post('/xiaofeng/add_user', params);
};

/**
 * 获取用户信息
 * @param {Object} params
 */
export const getUserInfo = (params) => {
    return http.post('/xiaofeng/select_user', params);
};
